package cn.youth996.springcloud.service.impl;

import cn.youth996.springcloud.dao.PaymentDao;
import cn.youth996.springcloud.entities.Payment;
import cn.youth996.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Zhan Xinjian
 * @date 2021/3/4
 */
@Service
public class PaymentServiceImpl implements PaymentService {
    @Resource
    private PaymentDao paymentDao;

    @Override
    public boolean save(Payment payment) {
        return paymentDao.insert(payment)>0;
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.selectPaymentById(id);
    }
}
